package com.qf.st.util;

import java.util.Random;

public class ColorUtil {

    public static String getRandomColor() {
        Random random = new Random();

        // 生成随机的红、绿、蓝三个通道的值
        int red = random.nextInt(256); // 0 to 255
        int green = random.nextInt(256); // 0 to 255
        int blue = random.nextInt(256); // 0 to 255

        // 将RGB值转换为十六进制格式的字符串
        String hexColor = String.format("#%02X%02X%02X", red, green, blue);

        return hexColor;
    }

}
